package com.aaa.dem1110.模板方法模式;

/**
 * @Author: whj
 * @Version 1.0
 * @Date: 2022/11/10  15:04
 */
public abstract class ChaoCai {
    //购买材料
    public abstract void buy();
    //材料的处理
    public abstract void handle();
    //起锅烧油
    public abstract  void qiguoshaoyou();
    //放入材料
    public abstract  void putin();

    //放入调料
    public abstract  void tiaoliao();

    //翻炒均匀
    public abstract  void fanchao();
    //盛菜
    public abstract  void chengCai();

    //炒菜--该方法一定不会被重写
    public final void chaiCai(){
        buy();
        handle();
        qiguoshaoyou();
        putin();
        tiaoliao();
        fanchao();
        chengCai();
    }
}
